package com.woniuxy.mapper.custom;

import com.woniuxy.entity.Emp;
import com.woniuxy.mapper.EmpMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CustomEmpMapper extends EmpMapper {
    List<Integer> findRoleIdsByEmpId(Integer empId);

    int distRoleToEmp(@Param("empId") Integer empId, List<Integer> roleIds);

    int revokeRoleFromEmp(Integer empId);
    List<Emp> findByLike(String like);

    int updatePassword(Integer empId,String newUpwd);

    Emp findByPass(String oldPass,Integer empId);
}